import request from './request';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const getProductClass = (data: any) => {
  return request({
    url: `/api/getProductClass`,
    method: 'GET',
    data,
  });
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const getStoresList = (data: any) => {
  return request({
    url: `/api/getStoresList`,
    method: 'GET',
    data,
  });
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const getRestRant = () => {
  return request({
    url: `api/getSpecialtyRestaurant`,
    method: 'GET',
  });
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const getHotList = () => {
  return request({
    url: `/api/getProductHot`,
    method: 'GET',
  });
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const getBannerList = (data: any) => {
  return request({
    url: `/api/getBanner`,
    method: 'GET',
    data,
  });
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const getShopGoodsList = (data: any) => {
  return request({
    url: `/api/getShopGoodsList`,
    method: 'GET',
    data,
  });
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const getGoodsDetails = (data: any) => {
  return request({
    url: `/api/getGoodsDetails`,
    method: 'GET',
    data,
  });
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const login = (data: any) => {
  return request({
    url: `/api/login`,
    method: 'POST',
    data,
  });
};

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const register = (data: any) => {
  return request({
    url: `/api/register`,
    method: 'POST',
    data,
  });
};

//获取商店的信息信息
export const getShopDetails = (data: any) => {
  return request({
    url: `/api/getShopDetails`,
    method: 'get',
    data,
  });
};

//获取商店详情中的推荐商品 参数 limit（需要多少条数据）
export const getShopGoodsHotList = (data: any) => {
  return request({
    url: `/api/getShopGoodsHotList`,
    method: 'get',
    data,
  });
};

//用户添加收获地址
export const getUserAddressAdd = (data: any) => {
  return request({
    url: `/api/getUserAddressAdd`,
    method: 'post',
    data,
  });
};

//用户获取收获地址
export const getUserAddress = (data: any) => {
  return request({
    url: `/api/getUserAddress`,
    method: 'get',
    data,
  });
};

//用户下单页面  message(字符串参数)
export const setUserPlaceOrder = (data: any) => {
  return request({
    url: `/api/setUserPlaceOrder`,
    method: 'get',
    data,
  });
};

//订单详情页面  orderNo(订单号)
export const getUserOrderData = (data: any) => {
  return request({
    url: `/api/getUserOrderData`,
    method: 'post',
    data,
  });
};

//获取订单列表页面 page limit
export const GetUserOrderDataList = (data: any) => {
  return request({
    url: `/api/getUserOrderDataList`,
    method: 'post',
    data,
  });
};

//登录后台
export const loginAdmin = (data: any) => {
  return request({
    url: `/api/admin/login`,
    method: 'post',
    data,
  });
};

//获取商户列表页面 page limit
export const GetShopList = (data: any) => {
  return request({
    url: `api/admin/getShopList`,
    method: 'get',
    data,
  });
};

//删除商户
export const deleteShopApi = (data: any) => {
  return request({
    url: `api/admin/setShopDelete`,
    method: 'get',
    data,
  });
};

//获取商户商品 page limit
export const GoodsList = (data: any) => {
  return request({
    url: `api/admin/goodsList`,
    method: 'get',
    data,
  });
};

//新增商品
export const GoodsAdd = (data: any) => {
  return request({
    url: `api/admin/goodsAdd`,
    method: 'post',
    data,
  });
};

//编辑商品
export const GoodsEdit = (data: any) => {
  return request({
    url: `api/admin/goodsEdit`,
    method: 'post',
    data,
  });
};

export const goodsDel = (data: any) => {
  return request({
    url: `api/admin/goodsDel`,
    method: 'post',
    data,
  });
};

//新增商品价格
export const GoodsPriceAddAndEdit = (data: any) => {
  return request({
    url: `api/admin/goodsPriceAddAndEdit`,
    method: 'post',
    data,
  });
};

// 商户分类信息
export const ShopTypeAddAndEdit = (data: any) => {
  return request({
    url: `api/admin/shopTypeAddAndEdit`,
    method: 'post',
    data,
  });
};

// 新增用户
export const UserAddAndEdit = (data: any) => {
  return request({
    url: `api/admin/userAddAndEdit`,
    method: 'post',
    data,
  });
};

// 新增用户
export const UploadImage = (data: any) => {
  return request({
    url: `api/setUpload`,
    method: 'post',
    data,
  });
};

// 新增用户
export const GetOrderListApi = (data: any) => {
  return request({
    url: `api/admin/getOrderList`,
    method: 'get',
    data,
  });
};
// 修改用户余额
export const SetUserBalance = (data: any) => {
  return request({
    url: `api/admin/setBalance`,
    method: 'post',
    data,
  });
};

// 获取用户列表
export const GetUserList = (data: any) => {
  return request({
    url: `api/admin/userList`,
    method: 'get',
    data,
  });
};

// 获取用户列表
export const GetPayAndEditApi = (data: any) => {
  return request({
    url: `api/admin/getPayAndEdit`,
    method: 'post',
    data,
  });
};

// 获取用户列表
export const SetPayStatusApi = (data: any) => {
  return request({
    url: `api/admin/setPayStatus`,
    method: 'post',
    data,
  });
};
// 通过提现
export const setPayStatusAgreeApi = (data: any) => {
  return request({
    url: `api/admin/setPayStatusAgree`,
    method: 'post',
    data,
  });
};


// 获取用户列表
export const GetUserDetailsApi = (data: any) => {
  return request({
    url: `api/admin/getUserDetails`,
    method: 'post',
    data,
  });
};

// 获取控制台统计数据
export const StatisticsDataApi = (data: any) => {
  return request({
    url: `api/admin/statisticsData`,
    method: 'get',
    data,
  });
};

// 修改用户佣金比例
export const SetEditUserRate = (data: any) => {
  return request({
    url: `api/admin/SetEditUserRate`,
    method: 'get',
    data,
  });
};

// 获取选择banner列表 接口弃用
export const GetBannerSelectApi = (data: any) => {
  // return request({
  //   url: `api/admin/getBannerSelect`,
  //   method: 'get',
  //   data,
  // });
};

// 设置店铺封面图 接口弃用
export const ShopCoverAddAndEditApi = (data: any) => {
  // return request({
  //   url: `api/admin/shopCoverAddAndEdit`,
  //   method: 'post',
  //   data,
  // });
};

// 设置店铺banner图
export const ShopBannerAddAndEditApi = (data: any) => {
  return request({
    url: `api/admin/shopBannerAddAndEdit`,
    method: 'post',
    data,
  });
};

// 设置店铺banner图
export const bannerAddAndEdit = (data: any) => {
  return request({
    url: `api/admin/bannerAddAndEdit`,
    method: 'post',
    data,
  });
};
//粉丝文件上传
export const setUploadTxtApi = (data: any) => {
  return request({
    url: `api/common/setUploadTxt`,
    method: 'post',
    data,
  });
};

//粉丝文件上传
export const FansPhoneListApi = (data: any) => {
  return request({
    url: `api/common/getPhoneList`,
    method: 'post',
    data,
  });
};
export const FansAdminPhoneListApi = (data: any) => {
  return request({
    url: `api/admin/getPhoneList`,
    method: 'post',
    data,
  });
};

// 用户地址(收货地址)
export const GetAddressAddAndEditApi = (data: any) => {
  return request({
    url: `api/agent/getAddressAddAndEdit`,
    method: 'post',
    data,
  });
};


// 用户地址(收货地址)
export const GetShopDetailsApi = (data: any) => {
  return request({
    url: `api/admin/getShopDetails`,
    method: 'post',
    data,
  });
};

// 用户地址(收货地址)
export const SetShopEditApi = (data: any) => {
  return request({
    url: `api/admin/setShopEdit`,
    method: 'post',
    data,
  });
};

// 用户地址(收货地址)
export const SetShopAddApi = (data: any) => {
  return request({
    url: `api/admin/setShopAdd`,
    method: 'post',
    data,
  });
};

// ------------------- 经销商

// 店铺列表
export const GoodsDataListApi = (data: any) => {
  return request({
    url: `api/agent/GoodsDataList`,
    method: 'post',
    data,
  });
};

// 生成代付链接
export const SetUserPlaceOrderApi = (data: any) => {
  return request({
    url: `api/agent/setUserPlaceOrder`,
    method: 'post',
    data,
  });
};

// 代付链接列表
export const GetOrderDataListApi = (data: any) => {
  return request({
    url: `api/agent/getOrderDataList`,
    method: 'post',
    data,
  });
};

// 删除链接
export const DeleteOrderDataApi = (data: any) => {
  return request({
    url: `api/agent/deleteOrderData`,
    method: 'post',
    data,
  });
};

// 删除链接
export const SetOrderRemarksApi = (data: any) => {
  return request({
    url: `api/agent/setOrderRemarks`,
    method: 'post',
    data,
  });
};
export const setOneClickOrderCreationApi = (data: any) => {
  return request({
    url: `api/agent/setOneClickOrderCreation`,
    method: 'post',
    data,
  });
};
// 经销商-订单列表
export const GetOrderDoneDataListApi = (data: any) => {
  return request({
    url: `api/agent/getOrderDoneDataList`,
    method: 'post',
    data,
  });
};

// 经销商-提现数据
export const GetPayDataListApi = (data: any) => {
  return request({
    url: `api/agent/getPayDataList`,
    method: 'post',
    data,
  });
};

// 经销商-发起提现
export const SetPayWithdrawalApi = (data: any) => {
  return request({
    url: `api/agent/setPayWithdrawal`,
    method: 'post',
    data,
  });
};

// 经销商-发起提现
export const GetAgentUserInfoApi = (data: any) => {
  return request({
    url: `api/agent/getAgentUserInfo`,
    method: 'post',
    data,
  });
};

// 经销商-控制台数据
export const StatisticsDataNumApi = (data: any) => {
  return request({
    url: `api/agent/StatisticsDataNum`,
    method: 'post',
    data,
  });
};

// -----------------------------------------
// 经销商-发起提现
export const SerUserDataEdit = (data: any) => {
  return request({
    url: `api/common/serUserDataEdit`,
    method: 'post',
    data,
  });
};
export const SerRegionUserDataEdit = (data: any) => {
  return request({
    url: `api/region/serUserDataEdit`,
    method: 'post',
    data,
  });
};
export const setSysConfigListAndEditApi = (data: any) => {
  return request({
    url: `api/admin/setSysConfigListAndEdit`,
    method: 'post',
    data,
  });
};

// 经销商-订单列表
export const SetOrderEditStatusApi = (data: any) => {
  return request({
    url: `api/common/setOrderEditStatus`,
    method: 'post',
    data,
  });
};

// 区域代理
// 区域代理-用户列表
export const GetUserDataListApi = (data: any) => {
  return request({
    url: `api/region/getUserDataList`,
    method: 'post',
    data,
  });
};

// 区域代理-订单列表
export const GetRegionOrderDoneDataListApi = (data: any) => {
  return request({
    url: `api/region/getOrderDoneDataList`,
    method: 'post',
    data,
  });
};

// 区域代理-增加业务员
export const userRegionAddAndEdit = (data: any) => {
  return request({
    url: `api/region/userAddAndEdit`,
    method: 'post',
    data,
  });
};

// 经销商-发起提现
export const SetRegionPayWithdrawal = (data: any) => {
  return request({
    url: `api/region/setPayWithdrawal`,
    method: 'post',
    data,
  });
};

// 区域代理-佣金明细
export const getRegionOrderDataListApi = (data: any) => {
  return request({
    url: `/api/region/getOrderDataList`,
    method: 'post',
    data,
  });
};

// 经销商-提现数据
export const getRegionPayDataListApi = (data: any) => {
  return request({
    url: `api/region/getPayDataList`,
    method: 'post',
    data,
  });
};

// 区域 - 区域获取用户的佣金数(佣金提现数据);
export const getRegionUserDataInfoApi = (data: any) => {
  return request({
    url: `/api/region/getUserDataInfo`,
    method: 'post',
    data,
  });
};

// 区域 - 区域获取用户的佣金数(佣金提现数据);
export const setCartApi = (data: any) => {
  return request({
    url: `/api/setCart`,
    method: 'post',
    data,
  });
};

// 前端-商品购物车数据列表
export const getCartListApi = (data: any) => {
  return request({
    url: `/api/getCartList`,
    method: 'get',
    data,
  });
};

// 前端-商品购物车数据列表
export const setCartDelApi = (data: any) => {
  return request({
    url: `/api/setCartDel`,
    method: 'get',
    data,
  });
};

// 前端-商品购物车数据列表
export const setUserPlaceOrderApi = (data: any) => {
  return request({
    url: `/api/setUserPlaceOrder`,
    method: 'post',
    data,
  });
};

// 前端-商品购物车数据列表
export const getUserOrderDataApi = (data: any) => {
  return request({
    url: `/api/getUserOrderData`,
    method: 'get',
    data,
  });
};

// 前端-代付页面订单支付时候修改备注
export const setOrderRemarksApi = (data: any) => {
  return request({
    url: `/api/setOrderRemarks`,
    method: 'post',
    data,
  });
};

// 前端-支付请求
export const payPalIndexApi = (data: any) => {
  return request({
    url: `/api/PayPalIndex`,
    method: 'post',
    data,
  });
};
